home *** CD-ROM | disk | FTP | other *** search
/ How Many Bugs in a Box / How Many Bugs in a Box.cdr / bugs / pagebar / 00038.ls < prev    next >
Encoding:
Text File  |  1995-04-04  |  1.4 KB  |  56 lines

  1. on mouseDown
  2.   global ragid, ragman, thestagescript, stay
  3.   go("Awdone")
  4.   if value(ragid) then
  5.     if the castType of cast ragid = #bitmap then
  6.       set the castNum of sprite (ragman + 2) to ragid
  7.     end if
  8.   end if
  9.   set myclick to the clickOn
  10.   set mkcast to the castNum of sprite myclick
  11.   set the castNum of sprite myclick to mkcast + 11
  12.   set roller to the mouseCast
  13.   repeat while the mouseDown
  14.     if the mouseCast <> roller then
  15.       set the castNum of sprite myclick to mkcast
  16.       if not rollOver(1) then
  17.         exit repeat
  18.       end if
  19.       set myclick to (the mouseH / 58) + 2
  20.       set mkcast to the castNum of sprite myclick
  21.       set the castNum of sprite myclick to mkcast + 11
  22.       set roller to the mouseCast
  23.     end if
  24.     updateStage()
  25.   end repeat
  26.   updateStage()
  27.   set stime to 0
  28.   if the number of cast string(myclick - 2) > 0 then
  29.     set stime to 45 + (the size of cast string(myclick - 2) / 183)
  30.   end if
  31.   puppetSound(string(myclick - 2))
  32.   set ptime to the timer
  33.   if stime > 0 then
  34.     repeat while the timer < (stime + ptime)
  35.       updateStage()
  36.     end repeat
  37.   end if
  38.   if myclick > 2 then
  39.     set stay to 0
  40.     sound stop 1
  41.     sound stop 2
  42.     tell the stage
  43.       go(1, "page" & myclick - 2)
  44.     end tell
  45.     forget(window "pagebar")
  46.   else
  47.     set stay to 0
  48.     tell the stage
  49.       go("return", "mainmenu")
  50.     end tell
  51.     puppetSound(0)
  52.     sound stop 2
  53.     forget(window "pagebar")
  54.   end if
  55. end
  56.